package prueba3;

import DAO.DAO;
import entidades.Mensaje;
import java.net.*;
import java.io.*;

public class Main {

    public static void main(String[] args) throws IOException, InterruptedException {
        Status estado = new Status();
        estado.setVisible(true);
        ServerSocket serverSocket = null;
        boolean listening = true;
        DAO dao = new DAO();
        int puerto = 5678;
        try {
            serverSocket = new ServerSocket(puerto);
        } catch (IOException e) {
            System.exit(-1);
        }
        System.out.println("Puerto: " + puerto);
        while (listening) {
            new Thread(new MultiServerThread(serverSocket.accept())).start();
            System.out.println("Cree Multiserver");
        }
        serverSocket.close();
    }
}
